.class public Lcom/waiqin365/lightapp/im/activity/SelectFileActivity;
.super Landroid/app/ListActivity;

# interfaces
.implements Landroid/view/View$OnClickListener;


# instance fields
.field private a:Ljava/util/List;

.field private b:Ljava/util/List;

.field private c:Ljava/util/List;

.field private d:Ljava/util/List;

.field private e:Ljava/io/File;

.field private f:Ljava/lang/String;

.field private g:Ljava/lang/String;

.field private h:Ljava/io/File;

.field private i:I

.field private j:Ljava/lang/String;

.field private k:Landroid/widget/LinearLayout;

.field private l:Ljava/io/File;

.field private m:Z

.field private n:Landroid/widget/ImageView;

.field private o:Landroid/widget/TextView;

.field private p:Landroid/widget/HorizontalScrollView;

.field private q:Landroid/widget/LinearLayout;

.field private r:Ljava/lang/String;


# direct methods
.method public constructor <init>()V
    .locals 2

    invoke-direct {p0}, Landroid/app/ListActivity;-><init>()V

    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V

    iput-object v0, p0, Lcom/waiqin365/lightapp/im/activity/SelectFileActivity;->a:Ljava/util/List;

    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V

    iput-object v0, p0, Lcom/waiqin365/lightapp/im/activity/SelectFileActivity;->b:Ljava/util/List;

    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V

    iput-object v0, p0, Lcom/waiqin365/lightapp/im/activity/SelectFileActivity;->c:Ljava/util/List;

    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V

    iput-object v0, p0, Lcom/waiqin365/lightapp/im/activity/SelectFileActivity;->d:Ljava/util/List;

    new-instance v0, Ljava/io/File;

    const-string/jumbo v1, ""

    invoke-direct {v0, v1}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    iput-object v0, p0, Lcom/waiqin365/lightapp/im/activity/SelectFileActivity;->e:Ljava/io/File;

    const-string/jumbo v0, ""

    iput-object v0, p0, Lcom/waiqin365/lightapp/im/activity/SelectFileActivity;->f:Ljava/lang/String;

    new-instance v0, Ljava/io/File;

    const-string/jumbo v1, ""

    invoke-direct {v0, v1}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    iput-object v0, p0, Lcom/waiqin365/lightapp/im/activity/SelectFileActivity;->h:Ljava/io/File;

    const/4 v0, 0x0

    iput-boolean v0, p0, Lcom/waiqin365/lightapp/im/activity/SelectFileActivity;->m:Z

    return-void
.end method

.method static synthetic a(Lcom/waiqin365/lightapp/im/activity/SelectFileActivity;)Ljava/util/List;
    .locals 1

    iget-object v0, p0, Lcom/waiqin365/lightapp/im/activity/SelectFileActivity;->d:Ljava/util/List;

    return-object v0
.end method

.method private a(I)V
    .locals 2

    new-instance v0, Landroid/os/Handler;

    invoke-direct {v0}, Landroid/os/Handler;-><init>()V

    new-instance v1, Lcom/waiqin365/lightapp/im/activity/cy;

    invoke-direct {v1, p0, p1}, Lcom/waiqin365/lightapp/im/activity/cy;-><init>(Lcom/waiqin365/lightapp/im/activity/SelectFileActivity;I)V

    invoke-virtual {v0, v1}, Landroid/os/Handler;->post(Ljava/lang/Runnable;)Z

    return-void
.end method

.method static synthetic a(Lcom/waiqin365/lightapp/im/activity/SelectFileActivity;Ljava/io/File;)V
    .locals 0

    invoke-direct {p0, p1}, Lcom/waiqin365/lightapp/im/activity/SelectFileActivity;->a(Ljava/io/File;)V

    return-void
.end method

.method private a(Ljava/io/File;)V
    .locals 7

    const/4 v5, 0x1

    const/16 v4, 0x99

    const/4 v2, 0x0

    if-nez p1, :cond_1

    :cond_0
    :goto_0
    return-void

    :cond_1
    invoke-virtual {p1}, Ljava/io/File;->isDirectory()Z

    move-result v0

    if-eqz v0, :cond_2

    iget-object v0, p0, Lcom/waiqin365/lightapp/im/activity/SelectFileActivity;->e:Ljava/io/File;

    invoke-virtual {p1, v0}, Ljava/io/File;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-nez v0, :cond_0

    iput-object p1, p0, Lcom/waiqin365/lightapp/im/activity/SelectFileActivity;->e:Ljava/io/File;

    invoke-direct {p0}, Lcom/waiqin365/lightapp/im/activity/SelectFileActivity;->d()V

    :cond_2
    invoke-direct {p0, p1}, Lcom/waiqin365/lightapp/im/activity/SelectFileActivity;->b(Ljava/io/File;)Ljava/lang/String;

    move-result-object v0

    iput-object v0, p0, Lcom/waiqin365/lightapp/im/activity/SelectFileActivity;->j:Ljava/lang/String;

    new-instance v1, Ljava/io/File;

    iget-object v3, p0, Lcom/waiqin365/lightapp/im/activity/SelectFileActivity;->j:Ljava/lang/String;

    invoke-direct {v1, v3}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    invoke-virtual {v1}, Ljava/io/File;->isFile()Z

    move-result v1

    if-eqz v1, :cond_3

    iget-object v0, p0, Lcom/waiqin365/lightapp/im/activity/SelectFileActivity;->o:Landroid/widget/TextView;

    const v1, 0x7f02011d

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setBackgroundResource(I)V

    iget-object v0, p0, Lcom/waiqin365/lightapp/im/activity/SelectFileActivity;->o:Landroid/widget/TextView;

    const/4 v1, -0x1

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setTextColor(I)V

    iget-object v0, p0, Lcom/waiqin365/lightapp/im/activity/SelectFileActivity;->o:Landroid/widget/TextView;

    invoke-virtual {v0, v5}, Landroid/widget/TextView;->setEnabled(Z)V

    goto :goto_0

    :cond_3
    iget-object v1, p0, Lcom/waiqin365/lightapp/im/activity/SelectFileActivity;->o:Landroid/widget/TextView;

    const v3, 0x7f02011c

    invoke-virtual {v1, v3}, Landroid/widget/TextView;->setBackgroundResource(I)V

    iget-object v1, p0, Lcom/waiqin365/lightapp/im/activity/SelectFileActivity;->o:Landroid/widget/TextView;

    invoke-static {v4, v4, v4}, Landroid/graphics/Color;->rgb(III)I

    move-result v3

    invoke-virtual {v1, v3}, Landroid/widget/TextView;->setTextColor(I)V

    iget-object v1, p0, Lcom/waiqin365/lightapp/im/activity/SelectFileActivity;->o:Landroid/widget/TextView;

    invoke-virtual {v1, v2}, Landroid/widget/TextView;->setEnabled(Z)V

    const-string/jumbo v1, "/"

    invoke-virtual {v0, v1}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z

    move-result v1

    if-eqz v1, :cond_4

    invoke-virtual {v0, v5}, Ljava/lang/String;->substring(I)Ljava/lang/String;

    move-result-object v0

    :cond_4
    const-string/jumbo v1, "/"

    invoke-virtual {v0, v1}, Ljava/lang/String;->endsWith(Ljava/lang/String;)Z

    move-result v1

    if-eqz v1, :cond_5

    invoke-virtual {v0}, Ljava/lang/String;->length()I

    move-result v1

    add-int/lit8 v1, v1, -0x1

    invoke-virtual {v0, v2, v1}, Ljava/lang/String;->substring(II)Ljava/lang/String;

    move-result-object v0

    :cond_5
    new-instance v4, Ljava/util/ArrayList;

    invoke-direct {v4}, Ljava/util/ArrayList;-><init>()V

    const/16 v1, 0x2f

    invoke-static {v0, v1, v4}, Lcom/fiberhome/gaea/client/d/k;->a(Ljava/lang/String;CLjava/util/ArrayList;)V

    iget-object v0, p0, Lcom/waiqin365/lightapp/im/activity/SelectFileActivity;->q:Landroid/widget/LinearLayout;

    invoke-virtual {v0}, Landroid/widget/LinearLayout;->removeAllViews()V

    move v1, v2

    move v3, v2

    :goto_1
    invoke-virtual {v4}, Ljava/util/ArrayList;->size()I

    move-result v0

    if-ge v1, v0, :cond_6

    new-instance v5, Lcom/waiqin365/lightapp/im/adapter/CustFileItemView;

    const/4 v0, 0x0

    invoke-direct {v5, p0, v0}, Lcom/waiqin365/lightapp/im/adapter/CustFileItemView;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V

    invoke-virtual {v4, v1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Ljava/lang/String;

    invoke-virtual {v5, v0}, Lcom/waiqin365/lightapp/im/adapter/CustFileItemView;->setText(Ljava/lang/String;)V

    invoke-virtual {v5, v1}, Lcom/waiqin365/lightapp/im/adapter/CustFileItemView;->setPosition(I)V

    invoke-static {v2, v2}, Landroid/view/View$MeasureSpec;->makeMeasureSpec(II)I

    move-result v0

    invoke-static {v2, v2}, Landroid/view/View$MeasureSpec;->makeMeasureSpec(II)I

    move-result v6

    invoke-virtual {v5, v0, v6}, Lcom/waiqin365/lightapp/im/adapter/CustFileItemView;->measure(II)V

    invoke-virtual {v5}, Lcom/waiqin365/lightapp/im/adapter/CustFileItemView;->getMeasuredWidth()I

    move-result v0

    add-int/2addr v3, v0

    new-instance v0, Lcom/waiqin365/lightapp/im/activity/cx;

    invoke-direct {v0, p0, v5, v4}, Lcom/waiqin365/lightapp/im/activity/cx;-><init>(Lcom/waiqin365/lightapp/im/activity/SelectFileActivity;Lcom/waiqin365/lightapp/im/adapter/CustFileItemView;Ljava/util/ArrayList;)V

    invoke-virtual {v5, v0}, Lcom/waiqin365/lightapp/im/adapter/CustFileItemView;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    iget-object v0, p0, Lcom/waiqin365/lightapp/im/activity/SelectFileActivity;->q:Landroid/widget/LinearLayout;

    invoke-virtual {v0, v5}, Landroid/widget/LinearLayout;->addView(Landroid/view/View;)V

    add-int/lit8 v0, v1, 0x1

    move v1, v0

    goto :goto_1

    :cond_6
    invoke-direct {p0, v3}, Lcom/waiqin365/lightapp/im/activity/SelectFileActivity;->a(I)V

    goto/16 :goto_0
.end method

.method private a(Ljava/util/List;Ljava/util/List;)V
    .locals 3

    invoke-interface {p2}, Ljava/util/List;->size()I

    move-result v1

    const/4 v0, 0x0

    :goto_0
    if-ge v0, v1, :cond_0

    invoke-interface {p2, v0}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v2

    invoke-interface {p1, v2}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    add-int/lit8 v0, v0, 0x1

    goto :goto_0

    :cond_0
    return-void
.end method

.method private a()Z
    .locals 1

    iget-object v0, p0, Lcom/waiqin365/lightapp/im/activity/SelectFileActivity;->k:Landroid/widget/LinearLayout;

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/waiqin365/lightapp/im/activity/SelectFileActivity;->k:Landroid/widget/LinearLayout;

    invoke-virtual {v0}, Landroid/widget/LinearLayout;->getVisibility()I

    move-result v0

    if-nez v0, :cond_0

    const/4 v0, 0x1

    :goto_0
    return v0

    :cond_0
    const/4 v0, 0x0

    goto :goto_0
.end method

.method static synthetic b(Lcom/waiqin365/lightapp/im/activity/SelectFileActivity;)Landroid/widget/LinearLayout;
    .locals 1

    iget-object v0, p0, Lcom/waiqin365/lightapp/im/activity/SelectFileActivity;->q:Landroid/widget/LinearLayout;

    return-object v0
.end method

.method private b(Ljava/io/File;)Ljava/lang/String;
    .locals 3

    invoke-virtual {p1}, Ljava/io/File;->getAbsolutePath()Ljava/lang/String;

    move-result-object v0

    iget-boolean v1, p0, Lcom/waiqin365/lightapp/im/activity/SelectFileActivity;->m:Z

    if-eqz v1, :cond_1

    :cond_0
    :goto_0
    return-object v0

    :cond_1
    iget-object v1, p0, Lcom/waiqin365/lightapp/im/activity/SelectFileActivity;->l:Ljava/io/File;

    invoke-virtual {v1}, Ljava/io/File;->getAbsolutePath()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z

    move-result v2

    if-eqz v2, :cond_0

    :try_start_0
    invoke-virtual {v1}, Ljava/lang/String;->length()I

    move-result v1

    invoke-virtual {v0, v1}, Ljava/lang/String;->substring(I)Ljava/lang/String;
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    move-result-object v0

    :goto_1
    const-string/jumbo v1, ""

    invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v1

    if-eqz v1, :cond_0

    const-string/jumbo v0, "/"

    goto :goto_0

    :catch_0
    move-exception v0

    const-string/jumbo v0, "/"

    goto :goto_1
.end method

.method private b()V
    .locals 8

    const/4 v5, -0x1

    iget-boolean v0, p0, Lcom/waiqin365/lightapp/im/activity/SelectFileActivity;->m:Z

    if-eqz v0, :cond_0

    new-instance v0, Ljava/io/File;

    iget-object v1, p0, Lcom/waiqin365/lightapp/im/activity/SelectFileActivity;->j:Ljava/lang/String;

    invoke-direct {v0, v1}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    :goto_0
    invoke-virtual {v0}, Ljava/io/File;->isDirectory()Z

    move-result v1

    if-eqz v1, :cond_1

    :goto_1
    return-void

    :cond_0
    new-instance v0, Ljava/io/File;

    iget-object v1, p0, Lcom/waiqin365/lightapp/im/activity/SelectFileActivity;->l:Ljava/io/File;

    iget-object v2, p0, Lcom/waiqin365/lightapp/im/activity/SelectFileActivity;->j:Ljava/lang/String;

    invoke-direct {v0, v1, v2}, Ljava/io/File;-><init>(Ljava/io/File;Ljava/lang/String;)V

    goto :goto_0

    :cond_1
    invoke-virtual {v0}, Ljava/io/File;->exists()Z

    move-result v1

    if-nez v1, :cond_2

    const v0, 0x7f080591

    invoke-virtual {p0, v0}, Lcom/waiqin365/lightapp/im/activity/SelectFileActivity;->getString(I)Ljava/lang/String;

    move-result-object v0

    const/4 v1, 0x0

    invoke-static {p0, v0, v1}, Lcom/waiqin365/lightapp/view/dk;->a(Landroid/content/Context;Ljava/lang/CharSequence;I)V

    goto :goto_1

    :cond_2
    invoke-virtual {p0}, Lcom/waiqin365/lightapp/im/activity/SelectFileActivity;->getIntent()Landroid/content/Intent;

    move-result-object v1

    invoke-virtual {v0}, Ljava/io/File;->getAbsolutePath()Ljava/lang/String;

    move-result-object v2

    const-string/jumbo v3, "filename"

    invoke-virtual {v1, v3, v2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;

    invoke-virtual {p0, v5, v1}, Lcom/waiqin365/lightapp/im/activity/SelectFileActivity;->setResult(ILandroid/content/Intent;)V

    iget-object v1, p0, Lcom/waiqin365/lightapp/im/activity/SelectFileActivity;->r:Ljava/lang/String;

    invoke-static {v1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v1

    if-nez v1, :cond_4

    new-instance v1, Ljava/util/HashMap;

    invoke-direct {v1}, Ljava/util/HashMap;-><init>()V

    const-string/jumbo v3, "filePath"

    invoke-interface {v1, v3, v2}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    const-string/jumbo v3, "fileName"

    invoke-virtual {v0}, Ljava/io/File;->getName()Ljava/lang/String;

    move-result-object v4

    invoke-interface {v1, v3, v4}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    const-string/jumbo v3, "fileSize"

    new-instance v4, Ljava/lang/StringBuilder;

    invoke-direct {v4}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {v0}, Ljava/io/File;->length()J

    move-result-wide v6

    invoke-virtual {v4, v6, v7}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;

    move-result-object v0

    const-string/jumbo v4, ""

    invoke-virtual {v0, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    invoke-interface {v1, v3, v0}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    const-string/jumbo v0, "."

    invoke-virtual {v2, v0}, Ljava/lang/String;->indexOf(Ljava/lang/String;)I

    move-result v0

    if-eq v0, v5, :cond_5

    const-string/jumbo v0, "."

    invoke-virtual {v2, v0}, Ljava/lang/String;->indexOf(Ljava/lang/String;)I

    move-result v0

    add-int/lit8 v0, v0, 0x1

    invoke-virtual {v2, v0}, Ljava/lang/String;->substring(I)Ljava/lang/String;

    move-result-object v0

    const-string/jumbo v2, "fileType"

    invoke-static {v0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v3

    if-eqz v3, :cond_3

    const-string/jumbo v0, "other"

    :cond_3
    invoke-interface {v1, v2, v0}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    :goto_2
    new-instance v0, Lcom/waiqin365/lightapp/view/a/a;

    invoke-direct {v0}, Lcom/waiqin365/lightapp/view/a/a;-><init>()V

    iget-object v2, p0, Lcom/waiqin365/lightapp/im/activity/SelectFileActivity;->r:Ljava/lang/String;

    iput-object v2, v0, Lcom/waiqin365/lightapp/view/a/a;->a:Ljava/lang/String;

    iput-object v1, v0, Lcom/waiqin365/lightapp/view/a/a;->b:Ljava/lang/Object;

    invoke-static {}, Lcom/waiqin365/lightapp/view/a/b;->a()Ljava/util/Observable;

    move-result-object v1

    invoke-virtual {v1, v0}, Ljava/util/Observable;->notifyObservers(Ljava/lang/Object;)V

    :cond_4
    invoke-direct {p0}, Lcom/waiqin365/lightapp/im/activity/SelectFileActivity;->back()V

    goto/16 :goto_1

    :cond_5
    const-string/jumbo v0, "fileType"

    const-string/jumbo v2, "other"

    invoke-interface {v1, v0, v2}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    goto :goto_2
.end method

.method private back()V
    .locals 2

    invoke-virtual {p0}, Lcom/waiqin365/lightapp/im/activity/SelectFileActivity;->finish()V

    const v0, 0x7f040020

    const v1, 0x7f040023

    invoke-virtual {p0, v0, v1}, Lcom/waiqin365/lightapp/im/activity/SelectFileActivity;->overridePendingTransition(II)V

    return-void
.end method

.method static synthetic c(Lcom/waiqin365/lightapp/im/activity/SelectFileActivity;)Landroid/widget/HorizontalScrollView;
    .locals 1

    iget-object v0, p0, Lcom/waiqin365/lightapp/im/activity/SelectFileActivity;->p:Landroid/widget/HorizontalScrollView;

    return-object v0
.end method

.method private c()V
    .locals 2

    iget v0, p0, Lcom/waiqin365/lightapp/im/activity/SelectFileActivity;->i:I

    if-lez v0, :cond_0

    iget v0, p0, Lcom/waiqin365/lightapp/im/activity/SelectFileActivity;->i:I

    add-int/lit8 v0, v0, -0x1

    iput v0, p0, Lcom/waiqin365/lightapp/im/activity/SelectFileActivity;->i:I

    :cond_0
    iget-object v0, p0, Lcom/waiqin365/lightapp/im/activity/SelectFileActivity;->e:Ljava/io/File;

    invoke-virtual {v0}, Ljava/io/File;->getAbsolutePath()Ljava/lang/String;

    move-result-object v0

    iget-object v1, p0, Lcom/waiqin365/lightapp/im/activity/SelectFileActivity;->l:Ljava/io/File;

    invoke-virtual {v1}, Ljava/io/File;->getAbsolutePath()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-nez v0, :cond_1

    iget-object v0, p0, Lcom/waiqin365/lightapp/im/activity/SelectFileActivity;->e:Ljava/io/File;

    invoke-virtual {v0}, Ljava/io/File;->getParentFile()Ljava/io/File;

    move-result-object v0

    invoke-direct {p0, v0}, Lcom/waiqin365/lightapp/im/activity/SelectFileActivity;->a(Ljava/io/File;)V

    :cond_1
    return-void
.end method

.method private d()V
    .locals 7

    const v6, 0x7f020172

    iget-object v0, p0, Lcom/waiqin365/lightapp/im/activity/SelectFileActivity;->e:Ljava/io/File;

    invoke-virtual {v0}, Ljava/io/File;->listFiles()[Ljava/io/File;

    move-result-object v1

    iget-object v0, p0, Lcom/waiqin365/lightapp/im/activity/SelectFileActivity;->d:Ljava/util/List;

    invoke-interface {v0}, Ljava/util/List;->clear()V

    iget-object v0, p0, Lcom/waiqin365/lightapp/im/activity/SelectFileActivity;->a:Ljava/util/List;

    invoke-interface {v0}, Ljava/util/List;->clear()V

    iget-object v0, p0, Lcom/waiqin365/lightapp/im/activity/SelectFileActivity;->b:Ljava/util/List;

    invoke-interface {v0}, Ljava/util/List;->clear()V

    iget-object v0, p0, Lcom/waiqin365/lightapp/im/activity/SelectFileActivity;->c:Ljava/util/List;

    invoke-interface {v0}, Ljava/util/List;->clear()V

    if-eqz v1, :cond_3

    array-length v2, v1

    const/4 v0, 0x0

    :goto_0
    if-ge v0, v2, :cond_3

    aget-object v3, v1, v0

    invoke-virtual {v3}, Ljava/io/File;->isDirectory()Z

    move-result v4

    if-eqz v4, :cond_2

    invoke-virtual {v3}, Ljava/io/File;->getAbsolutePath()Ljava/lang/String;

    move-result-object v4

    iget-object v5, p0, Lcom/waiqin365/lightapp/im/activity/SelectFileActivity;->f:Ljava/lang/String;

    invoke-virtual {v4, v5}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v4

    if-eqz v4, :cond_1

    invoke-virtual {p0}, Lcom/waiqin365/lightapp/im/activity/SelectFileActivity;->getResources()Landroid/content/res/Resources;

    move-result-object v4

    invoke-virtual {v4, v6}, Landroid/content/res/Resources;->getDrawable(I)Landroid/graphics/drawable/Drawable;

    move-result-object v4

    new-instance v5, Lcom/waiqin365/lightapp/im/adapter/bc;

    invoke-virtual {v3}, Ljava/io/File;->getName()Ljava/lang/String;

    move-result-object v3

    invoke-direct {v5, v3, v4}, Lcom/waiqin365/lightapp/im/adapter/bc;-><init>(Ljava/lang/String;Landroid/graphics/drawable/Drawable;)V

    iget-object v3, p0, Lcom/waiqin365/lightapp/im/activity/SelectFileActivity;->c:Ljava/util/List;

    invoke-interface {v3, v5}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    :cond_0
    :goto_1
    add-int/lit8 v0, v0, 0x1

    goto :goto_0

    :cond_1
    invoke-virtual {p0}, Lcom/waiqin365/lightapp/im/activity/SelectFileActivity;->getResources()Landroid/content/res/Resources;

    move-result-object v4

    invoke-virtual {v4, v6}, Landroid/content/res/Resources;->getDrawable(I)Landroid/graphics/drawable/Drawable;

    move-result-object v4

    new-instance v5, Lcom/waiqin365/lightapp/im/adapter/bc;

    invoke-virtual {v3}, Ljava/io/File;->getName()Ljava/lang/String;

    move-result-object v3

    invoke-direct {v5, v3, v4}, Lcom/waiqin365/lightapp/im/adapter/bc;-><init>(Ljava/lang/String;Landroid/graphics/drawable/Drawable;)V

    iget-object v3, p0, Lcom/waiqin365/lightapp/im/activity/SelectFileActivity;->a:Ljava/util/List;

    invoke-interface {v3, v5}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    goto :goto_1

    :cond_2
    invoke-virtual {v3}, Ljava/io/File;->isFile()Z

    move-result v4

    if-eqz v4, :cond_0

    invoke-virtual {v3}, Ljava/io/File;->getName()Ljava/lang/String;

    move-result-object v4

    invoke-static {v4}, Lcom/fiberhome/gaea/client/d/c;->a(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v4

    invoke-static {p0, v4}, Lcom/fiberhome/gaea/client/d/k;->a(Landroid/content/Context;Ljava/lang/String;)Landroid/graphics/drawable/Drawable;

    move-result-object v4

    new-instance v5, Lcom/waiqin365/lightapp/im/adapter/bc;

    invoke-virtual {v3}, Ljava/io/File;->getName()Ljava/lang/String;

    move-result-object v3

    invoke-direct {v5, v3, v4}, Lcom/waiqin365/lightapp/im/adapter/bc;-><init>(Ljava/lang/String;Landroid/graphics/drawable/Drawable;)V

    const/4 v3, 0x1

    iput-boolean v3, v5, Lcom/waiqin365/lightapp/im/adapter/bc;->c:Z

    iget-object v3, p0, Lcom/waiqin365/lightapp/im/activity/SelectFileActivity;->b:Ljava/util/List;

    invoke-interface {v3, v5}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    goto :goto_1

    :cond_3
    iget-object v0, p0, Lcom/waiqin365/lightapp/im/activity/SelectFileActivity;->a:Ljava/util/List;

    invoke-static {v0}, Ljava/util/Collections;->sort(Ljava/util/List;)V

    iget-object v0, p0, Lcom/waiqin365/lightapp/im/activity/SelectFileActivity;->b:Ljava/util/List;

    invoke-static {v0}, Ljava/util/Collections;->sort(Ljava/util/List;)V

    iget-object v0, p0, Lcom/waiqin365/lightapp/im/activity/SelectFileActivity;->d:Ljava/util/List;

    iget-object v1, p0, Lcom/waiqin365/lightapp/im/activity/SelectFileActivity;->c:Ljava/util/List;

    invoke-direct {p0, v0, v1}, Lcom/waiqin365/lightapp/im/activity/SelectFileActivity;->a(Ljava/util/List;Ljava/util/List;)V

    iget-object v0, p0, Lcom/waiqin365/lightapp/im/activity/SelectFileActivity;->d:Ljava/util/List;

    iget-object v1, p0, Lcom/waiqin365/lightapp/im/activity/SelectFileActivity;->a:Ljava/util/List;

    invoke-direct {p0, v0, v1}, Lcom/waiqin365/lightapp/im/activity/SelectFileActivity;->a(Ljava/util/List;Ljava/util/List;)V

    iget-object v0, p0, Lcom/waiqin365/lightapp/im/activity/SelectFileActivity;->d:Ljava/util/List;

    iget-object v1, p0, Lcom/waiqin365/lightapp/im/activity/SelectFileActivity;->b:Ljava/util/List;

    invoke-direct {p0, v0, v1}, Lcom/waiqin365/lightapp/im/activity/SelectFileActivity;->a(Ljava/util/List;Ljava/util/List;)V

    new-instance v0, Lcom/waiqin365/lightapp/im/adapter/as;

    invoke-direct {v0, p0}, Lcom/waiqin365/lightapp/im/adapter/as;-><init>(Landroid/content/Context;)V

    iget-object v1, p0, Lcom/waiqin365/lightapp/im/activity/SelectFileActivity;->d:Ljava/util/List;

    invoke-virtual {v0, v1}, Lcom/waiqin365/lightapp/im/adapter/as;->a(Ljava/util/List;)V

    invoke-virtual {p0, v0}, Lcom/waiqin365/lightapp/im/activity/SelectFileActivity;->setListAdapter(Landroid/widget/ListAdapter;)V

    return-void
.end method

.method private e()V
    .locals 1

    invoke-static {}, Landroid/os/Environment;->getExternalStorageDirectory()Ljava/io/File;

    move-result-object v0

    invoke-virtual {v0}, Ljava/io/File;->getAbsolutePath()Ljava/lang/String;

    move-result-object v0

    iput-object v0, p0, Lcom/waiqin365/lightapp/im/activity/SelectFileActivity;->f:Ljava/lang/String;

    return-void
.end method


# virtual methods
.method public onBackPressed()V
    .locals 0

    invoke-direct {p0}, Lcom/waiqin365/lightapp/im/activity/SelectFileActivity;->back()V

    return-void
.end method

.method public onClick(Landroid/view/View;)V
    .locals 1

    invoke-virtual {p1}, Landroid/view/View;->getId()I

    move-result v0

    packed-switch v0, :pswitch_data_0

    :goto_0
    :pswitch_0
    return-void

    :pswitch_1
    invoke-direct {p0}, Lcom/waiqin365/lightapp/im/activity/SelectFileActivity;->back()V

    goto :goto_0

    :pswitch_2
    invoke-direct {p0}, Lcom/waiqin365/lightapp/im/activity/SelectFileActivity;->b()V

    goto :goto_0

    :pswitch_data_0
    .packed-switch 0x7f0c070f
        :pswitch_1
        :pswitch_0
        :pswitch_0
        :pswitch_2
    .end packed-switch
.end method

.method public onCreate(Landroid/os/Bundle;)V
    .locals 3

    const/4 v2, 0x0

    invoke-super {p0, p1}, Landroid/app/ListActivity;->onCreate(Landroid/os/Bundle;)V

    invoke-static {p0}, Lcom/fiberhome/gaea/client/d/a;->b(Landroid/app/Activity;)V

    const v0, 0x7f03016c

    invoke-virtual {p0, v0}, Lcom/waiqin365/lightapp/im/activity/SelectFileActivity;->setContentView(I)V

    const v0, 0x7f0c070f

    invoke-virtual {p0, v0}, Lcom/waiqin365/lightapp/im/activity/SelectFileActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/ImageView;

    iput-object v0, p0, Lcom/waiqin365/lightapp/im/activity/SelectFileActivity;->n:Landroid/widget/ImageView;

    iget-object v0, p0, Lcom/waiqin365/lightapp/im/activity/SelectFileActivity;->n:Landroid/widget/ImageView;

    invoke-virtual {v0, p0}, Landroid/widget/ImageView;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    const v0, 0x7f0c0711

    invoke-virtual {p0, v0}, Lcom/waiqin365/lightapp/im/activity/SelectFileActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/TextView;

    const v1, 0x7f0802aa

    invoke-virtual {p0, v1}, Lcom/waiqin365/lightapp/im/activity/SelectFileActivity;->getString(I)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    const v0, 0x7f0c0712

    invoke-virtual {p0, v0}, Lcom/waiqin365/lightapp/im/activity/SelectFileActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/TextView;

    iput-object v0, p0, Lcom/waiqin365/lightapp/im/activity/SelectFileActivity;->o:Landroid/widget/TextView;

    iget-object v0, p0, Lcom/waiqin365/lightapp/im/activity/SelectFileActivity;->o:Landroid/widget/TextView;

    const v1, 0x7f0805d3

    invoke-virtual {p0, v1}, Lcom/waiqin365/lightapp/im/activity/SelectFileActivity;->getString(I)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    iget-object v0, p0, Lcom/waiqin365/lightapp/im/activity/SelectFileActivity;->o:Landroid/widget/TextView;

    invoke-virtual {v0, p0}, Landroid/widget/TextView;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    const v0, 0x7f0c0811

    invoke-virtual {p0, v0}, Lcom/waiqin365/lightapp/im/activity/SelectFileActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/HorizontalScrollView;

    iput-object v0, p0, Lcom/waiqin365/lightapp/im/activity/SelectFileActivity;->p:Landroid/widget/HorizontalScrollView;

    const v0, 0x7f0c0812

    invoke-virtual {p0, v0}, Lcom/waiqin365/lightapp/im/activity/SelectFileActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/LinearLayout;

    iput-object v0, p0, Lcom/waiqin365/lightapp/im/activity/SelectFileActivity;->q:Landroid/widget/LinearLayout;

    invoke-virtual {p0}, Lcom/waiqin365/lightapp/im/activity/SelectFileActivity;->getListView()Landroid/widget/ListView;

    move-result-object v0

    const v1, 0x7f0c0813

    invoke-virtual {p0, v1}, Lcom/waiqin365/lightapp/im/activity/SelectFileActivity;->findViewById(I)Landroid/view/View;

    move-result-object v1

    invoke-virtual {v0, v1}, Landroid/widget/ListView;->setEmptyView(Landroid/view/View;)V

    invoke-virtual {p0}, Lcom/waiqin365/lightapp/im/activity/SelectFileActivity;->getListView()Landroid/widget/ListView;

    move-result-object v0

    invoke-virtual {v0, v2}, Landroid/widget/ListView;->setCacheColorHint(I)V

    invoke-direct {p0}, Lcom/waiqin365/lightapp/im/activity/SelectFileActivity;->e()V

    iget-object v0, p0, Lcom/waiqin365/lightapp/im/activity/SelectFileActivity;->f:Ljava/lang/String;

    invoke-static {v0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v0

    if-nez v0, :cond_2

    new-instance v0, Ljava/io/File;

    iget-object v1, p0, Lcom/waiqin365/lightapp/im/activity/SelectFileActivity;->f:Ljava/lang/String;

    invoke-direct {v0, v1}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    invoke-virtual {v0}, Ljava/io/File;->canRead()Z

    move-result v0

    if-eqz v0, :cond_2

    const/4 v0, 0x1

    iput-boolean v0, p0, Lcom/waiqin365/lightapp/im/activity/SelectFileActivity;->m:Z

    new-instance v0, Ljava/io/File;

    iget-object v1, p0, Lcom/waiqin365/lightapp/im/activity/SelectFileActivity;->f:Ljava/lang/String;

    invoke-direct {v0, v1}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    iput-object v0, p0, Lcom/waiqin365/lightapp/im/activity/SelectFileActivity;->l:Ljava/io/File;

    :goto_0
    const/4 v0, 0x0

    iput-object v0, p0, Lcom/waiqin365/lightapp/im/activity/SelectFileActivity;->k:Landroid/widget/LinearLayout;

    invoke-virtual {p0}, Lcom/waiqin365/lightapp/im/activity/SelectFileActivity;->getIntent()Landroid/content/Intent;

    move-result-object v0

    const-string/jumbo v1, "returnTo"

    invoke-virtual {v0, v1}, Landroid/content/Intent;->getStringExtra(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v1

    iput-object v1, p0, Lcom/waiqin365/lightapp/im/activity/SelectFileActivity;->r:Ljava/lang/String;

    const-string/jumbo v1, "filepath"

    invoke-virtual {v0, v1}, Landroid/content/Intent;->getStringExtra(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v1

    if-eqz v1, :cond_3

    invoke-virtual {v1}, Ljava/lang/String;->length()I

    move-result v0

    if-lez v0, :cond_3

    new-instance v0, Ljava/io/File;

    invoke-direct {v0, v1}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    :goto_1
    if-eqz v0, :cond_0

    invoke-direct {p0, v0}, Lcom/waiqin365/lightapp/im/activity/SelectFileActivity;->b(Ljava/io/File;)Ljava/lang/String;

    move-result-object v1

    iput-object v1, p0, Lcom/waiqin365/lightapp/im/activity/SelectFileActivity;->j:Ljava/lang/String;

    :cond_0
    iput v2, p0, Lcom/waiqin365/lightapp/im/activity/SelectFileActivity;->i:I

    if-eqz p1, :cond_1

    new-instance v0, Ljava/io/File;

    const-string/jumbo v1, "current_directory"

    invoke-virtual {p1, v1}, Landroid/os/Bundle;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v1

    invoke-direct {v0, v1}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    new-instance v1, Ljava/io/File;

    const-string/jumbo v2, "context_file"

    invoke-virtual {p1, v2}, Landroid/os/Bundle;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v2

    invoke-direct {v1, v2}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    iput-object v1, p0, Lcom/waiqin365/lightapp/im/activity/SelectFileActivity;->h:Ljava/io/File;

    const-string/jumbo v1, "context_text"

    invoke-virtual {p1, v1}, Landroid/os/Bundle;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v1

    iput-object v1, p0, Lcom/waiqin365/lightapp/im/activity/SelectFileActivity;->g:Ljava/lang/String;

    const-string/jumbo v1, "steps_back"

    invoke-virtual {p1, v1}, Landroid/os/Bundle;->getInt(Ljava/lang/String;)I

    move-result v1

    iput v1, p0, Lcom/waiqin365/lightapp/im/activity/SelectFileActivity;->i:I

    :cond_1
    invoke-direct {p0, v0}, Lcom/waiqin365/lightapp/im/activity/SelectFileActivity;->a(Ljava/io/File;)V

    return-void

    :cond_2
    iput-boolean v2, p0, Lcom/waiqin365/lightapp/im/activity/SelectFileActivity;->m:Z

    new-instance v0, Ljava/io/File;

    invoke-static {}, Lcom/fiberhome/gaea/client/c/b;->b()Lcom/fiberhome/gaea/client/c/b;

    move-result-object v1

    invoke-virtual {v1}, Lcom/fiberhome/gaea/client/c/b;->g()Ljava/lang/String;

    move-result-object v1

    invoke-direct {v0, v1}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    iput-object v0, p0, Lcom/waiqin365/lightapp/im/activity/SelectFileActivity;->l:Ljava/io/File;

    iget-object v0, p0, Lcom/waiqin365/lightapp/im/activity/SelectFileActivity;->l:Ljava/io/File;

    invoke-virtual {v0}, Ljava/io/File;->getParentFile()Ljava/io/File;

    move-result-object v0

    iput-object v0, p0, Lcom/waiqin365/lightapp/im/activity/SelectFileActivity;->l:Ljava/io/File;

    goto :goto_0

    :cond_3
    iget-object v0, p0, Lcom/waiqin365/lightapp/im/activity/SelectFileActivity;->l:Ljava/io/File;

    goto :goto_1
.end method

.method public onKeyDown(ILandroid/view/KeyEvent;)Z
    .locals 1

    const/4 v0, 0x4

    if-ne p1, v0, :cond_0

    const/4 v0, 0x0

    iput v0, p0, Lcom/waiqin365/lightapp/im/activity/SelectFileActivity;->i:I

    invoke-direct {p0}, Lcom/waiqin365/lightapp/im/activity/SelectFileActivity;->back()V

    const/4 v0, 0x1

    :goto_0
    return v0

    :cond_0
    invoke-super {p0, p1, p2}, Landroid/app/ListActivity;->onKeyDown(ILandroid/view/KeyEvent;)Z

    move-result v0

    goto :goto_0
.end method

.method protected onListItemClick(Landroid/widget/ListView;Landroid/view/View;IJ)V
    .locals 2

    invoke-super/range {p0 .. p5}, Landroid/app/ListActivity;->onListItemClick(Landroid/widget/ListView;Landroid/view/View;IJ)V

    iget-object v0, p0, Lcom/waiqin365/lightapp/im/activity/SelectFileActivity;->d:Ljava/util/List;

    invoke-interface {v0, p3}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/waiqin365/lightapp/im/adapter/bc;

    iget-object v0, v0, Lcom/waiqin365/lightapp/im/adapter/bc;->a:Ljava/lang/String;

    const-string/jumbo v1, ".."

    invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_1

    invoke-direct {p0}, Lcom/waiqin365/lightapp/im/activity/SelectFileActivity;->c()V

    :cond_0
    :goto_0
    return-void

    :cond_1
    iget-object v0, p0, Lcom/waiqin365/lightapp/im/activity/SelectFileActivity;->e:Ljava/io/File;

    invoke-virtual {v0}, Ljava/io/File;->getAbsolutePath()Ljava/lang/String;

    move-result-object v1

    iget-object v0, p0, Lcom/waiqin365/lightapp/im/activity/SelectFileActivity;->d:Ljava/util/List;

    invoke-interface {v0, p3}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/waiqin365/lightapp/im/adapter/bc;

    iget-object v0, v0, Lcom/waiqin365/lightapp/im/adapter/bc;->a:Ljava/lang/String;

    invoke-static {v1, v0}, Lcom/fiberhome/gaea/client/d/c;->a(Ljava/lang/String;Ljava/lang/String;)Ljava/io/File;

    move-result-object v1

    if-eqz v1, :cond_0

    invoke-virtual {v1}, Ljava/io/File;->isDirectory()Z

    move-result v0

    if-eqz v0, :cond_2

    iget v0, p0, Lcom/waiqin365/lightapp/im/activity/SelectFileActivity;->i:I

    add-int/lit8 v0, v0, 0x1

    iput v0, p0, Lcom/waiqin365/lightapp/im/activity/SelectFileActivity;->i:I

    :goto_1
    invoke-direct {p0, v1}, Lcom/waiqin365/lightapp/im/activity/SelectFileActivity;->a(Ljava/io/File;)V

    goto :goto_0

    :cond_2
    invoke-virtual {p0}, Lcom/waiqin365/lightapp/im/activity/SelectFileActivity;->getListAdapter()Landroid/widget/ListAdapter;

    move-result-object v0

    check-cast v0, Lcom/waiqin365/lightapp/im/adapter/as;

    iput p3, v0, Lcom/waiqin365/lightapp/im/adapter/as;->a:I

    invoke-virtual {v0}, Lcom/waiqin365/lightapp/im/adapter/as;->notifyDataSetChanged()V

    goto :goto_1
.end method

.method protected onSaveInstanceState(Landroid/os/Bundle;)V
    .locals 2

    invoke-super {p0, p1}, Landroid/app/ListActivity;->onSaveInstanceState(Landroid/os/Bundle;)V

    const-string/jumbo v0, "current_directory"

    iget-object v1, p0, Lcom/waiqin365/lightapp/im/activity/SelectFileActivity;->e:Ljava/io/File;

    invoke-virtual {v1}, Ljava/io/File;->getAbsolutePath()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {p1, v0, v1}, Landroid/os/Bundle;->putString(Ljava/lang/String;Ljava/lang/String;)V

    const-string/jumbo v0, "context_file"

    iget-object v1, p0, Lcom/waiqin365/lightapp/im/activity/SelectFileActivity;->h:Ljava/io/File;

    invoke-virtual {v1}, Ljava/io/File;->getAbsolutePath()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {p1, v0, v1}, Landroid/os/Bundle;->putString(Ljava/lang/String;Ljava/lang/String;)V

    const-string/jumbo v0, "context_text"

    iget-object v1, p0, Lcom/waiqin365/lightapp/im/activity/SelectFileActivity;->g:Ljava/lang/String;

    invoke-virtual {p1, v0, v1}, Landroid/os/Bundle;->putString(Ljava/lang/String;Ljava/lang/String;)V

    invoke-direct {p0}, Lcom/waiqin365/lightapp/im/activity/SelectFileActivity;->a()Z

    move-result v0

    const-string/jumbo v1, "show_directory_input"

    invoke-virtual {p1, v1, v0}, Landroid/os/Bundle;->putBoolean(Ljava/lang/String;Z)V

    const-string/jumbo v0, "steps_back"

    iget v1, p0, Lcom/waiqin365/lightapp/im/activity/SelectFileActivity;->i:I

    invoke-virtual {p1, v0, v1}, Landroid/os/Bundle;->putInt(Ljava/lang/String;I)V

    return-void
.end method
